<!-- 主页 -->
<template>
    <div class="front-container">
        <!-- 轮播图部分 -->
        <el-carousel class="carousel" trigger="click" height="400px">
            <el-carousel-item v-for="(img, idx) in carouselImages" :key="idx">
                <img :src="img" class="carousel-img" />
            </el-carousel-item>
        </el-carousel>

        <!-- 关于我们部分 -->
        <section class="about-us-section">
            <div class="section-title">
                <h2>关于我们</h2>
            </div>
            <el-row :gutter="20" class="about-content">
                <el-col :span="8">
                    <div class="about-title">
                        <h2>关于我们</h2>
                        <p>ABOUT US</p>
                        <div class="divider">——</div>
                    </div>
                </el-col>
                <el-col :span="16">
                    <div class="about-text">
                        <p>田园帮帮，源于对乡村振兴的深切关注。</p>
                        <p>
                            我们致力于为广大农户提供"融资+采购"一体化暖心服务，解决农业经营中的资金短缺和采购难题。
                        </p>
                        <p>通过线上申请、便捷审批与农资直供，我们拉近了农户与服务的距离。</p>
                        <p>田园帮帮，不仅是工具，更是乡村振兴路上的温暖伙伴。</p>
                    </div>
                </el-col>
            </el-row>
        </section>

        <!-- 底部信息 -->
        <footer class="bottom-menu-container">
            <div class="bottom-menu-box">
                <el-icon><Location /></el-icon>
                地址: 太原理工大学明向校区
            </div>
            <div class="bottom-menu-box">
                <el-icon><Phone /></el-icon>
                联系电话: 12345678910
            </div>
            <div class="bottom-menu-box">
                <el-icon><Message /></el-icon>
                邮箱: abc@qq.com
            </div>
        </footer>
    </div>
</template>

<script setup>
import { Location, Phone, Message } from '@element-plus/icons-vue'
import { ElCarousel, ElCarouselItem, ElRow, ElCol } from 'element-plus'

const carouselImages = [
    new URL('@/assets/Info/Carouselimages/carousel1.jpg', import.meta.url).href,
    new URL('@/assets/Info/Carouselimages/carousel2.jpg', import.meta.url).href
]
</script>

<style lang="less" scoped>
.front-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.carousel {
    width: 100%;
    margin: 30px auto;
    .carousel-img {
        width: 100%;
        height: 400px;
        object-fit: cover;
        display: block;
    }
}

.about-us-section {
    max-width: 1600px;
    background: #fff;
    border-radius: 12px;
    border: 2px solid #d4b106;
    padding: 20px;

    .section-title {
        text-align: center;
        margin-bottom: 32px;
        h2 {
            font-size: 32px;
            color: #8b6b2e;
            margin-bottom: 8px;
        }
        p {
            color: #666;
            font-size: 18px;
        }
    }
    .about-content {
        margin-top: 0;
        .about-title {
            background: linear-gradient(135deg, #d4b106 70%, #f5d76e 100%);
            color: #fff;
            border-radius: 8px;
            padding: 60px 10px;
            h2 {
                font-size: 32px;
                margin: 0;
            }
            p {
                font-size: 18px;
                margin: 10px 0;
            }
            .divider {
                font-size: 20px;
                margin-top: 10px;
            }
        }
        .about-text {
            text-align: left;
            padding: 20px;
            p {
                text-indent: 2em;
                line-height: 1.8;
                color: #666;
                margin-bottom: 16px;
                font-size: 16px;
            }
        }
    }
}

.bottom-menu-container {
    background: #8b6b2e;
    color: #fff9e6;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    height: 120px;
    margin-top: 60px;
    border-radius: 12px;

    .bottom-menu-box {
        display: flex;
        align-items: center;
        font-size: 18px;
        gap: 8px;
    }
}
</style>
